﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp3
{
    class Student
    {
        public int id;
        public string name;
        public int nianlin;

        public int ID//属性
        {
            get { return this.id; }
            set { this.id = value; }
        }
        public string Name
        {
            get { return this.name; }
            set { this.name = value; }
        }
        public int Nianlin
        {
            get { return this.nianlin; }
            set { this.nianlin = value; }
        }

        public Student() { }

        public Student(int id,string name,int nianlin)
        {
            this.id = id;
            this.name = name;
            this.nianlin = nianlin;
        }

        public override string ToString()
        {
            return $"学号：{id} 姓名{name} 年龄{nianlin}";
        }
    }
}
